package com.zyz.judge.controller;

import com.zyz.api.model.dto.JudgeSubmitDTO;
import com.zyz.api.model.vo.UserQuestionResultVO;
import com.zyz.common.core.model.Result;
import com.zyz.judge.service.IJudgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/judge")
public class JudgeController {

    @Autowired
    private IJudgeService judgeService;

    @RequestMapping(value = "/doJudgeJavaCode",method = RequestMethod.POST)
    Result<UserQuestionResultVO> doJudgeJavaCode(@RequestBody JudgeSubmitDTO judgeSubmitDTO){
        return Result.ok(judgeService.doJudgeJavaCode(judgeSubmitDTO));
    }
}
